<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>家长用户</a></li>
    </ul>
    <form class="well form-inline margin-top-20 row" method="post" action="{:url('user/parentIndex/index')}">
        <div class="row" style="margin-bottom: 15px">
            <!--<label for="用户名搜索" class="col-md-3 col-sm-6 " >-->
                <!--用户名：-->
                <!--<input class="form-control " type="text" name="user_login" style="" value="{:input('request.user_login')}"-->
                       <!--placeholder="请输入用户名">-->
            <!--</label>-->
            <label for="注册时间搜索" class="col-md-5 col-sm-6 " >
                注册时间：
                <input class="form-control" type="text" name="start_time" style="width:35%;" value="{:input('request.start_time')}"
                       placeholder="年/月/日">
                -
                <input class="form-control" type="text" name="end_time" style="width:35%;" value="{:input('request.end_time')}"
                       placeholder="年/月/日">
            </label>
            <label for="状态" class="col-md-2 col-sm-6 " >
                状态:
                <select class="form-control" name="user_status">
                    <option value="3" {$f|default="0"}>全部</option>
                    <option value='1' {$a|default="0"}>正常</option>
                    <option value="0" {$b|default="0"}>封禁</option>
                </select>
            </label>

            <label for="占位" class="col-md-2 col-sm-6" >

            </label>
        </div>

        <div class="row">
            <!--<label for="昵称搜索" class="col-md-3 col-sm-6 ">-->
                <!--昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：-->
                <!--<input class="form-control" type="text" name="user_nickname" style="" value="{:input('request.user_nickname')}"-->
                       <!--placeholder="请输入用户昵称">-->
            <!--</label>-->

            <label for="关键词搜索" class="col-md-5 col-sm-6 " >
                关键字：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input class="form-control" type="text" name="keyword" style="" value="{:input('request.keyword')}"
                       placeholder="手机号/邮箱/昵称/真实姓名/用户名">
            </label>


            <label for="分类" class="col-md-2 col-sm-6 ">
                分类:
                <select class="form-control" name="user_status1" >
                    <option value="3" {$e|default="0"}>全部</option>
                    <option value="1"  {$c|default="0"}>未报名</option>
                    <option value="2"  {$d|default="0"}>报名</option>
                </select>
            </label>



            <!--关键字：-->
            <!--<input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"-->
            <!--placeholder="用户名/昵称/邮箱">-->
            <label for="搜索栏" class="col-md-2 col-sm-6 ">
                <input type="submit" class="btn btn-primary" value="搜索"/>
                <a class="btn btn-danger" href="{:url('user/parentIndex/index')}">清空</a>
            </label>
        </div>

    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>ID</th>
                <th>{:lang('USERNAME')}</th>
                <th>{:lang('REALNAME')}</th>
                <th>{:lang('AVATAR')}</th>
                <th>{:lang('EMAIL')}</th>
                <th>手机</th>
                <th>联系地址</th>
                <th>登录方式</th>
                <th>{:lang('REGISTRATION_TIME')}</th>
                <th>{:lang('LAST_LOGIN_TIME')}</th>
                <th>{:lang('LAST_LOGIN_IP')}</th>
                <th>{:lang('STATUS')}</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <php>
                $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
            </php>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:lang('THIRD_PARTY_USER'))}
                    </td>
                    <td>{$vo['realname']?$vo['realname']:lang('NOT_FILLED')}</td>
                    <td><img width="25" height="25" src="{:url('user/public/avatar',array('id'=>$vo['id']))}"/></td>
                    <td>{$vo.user_email}</td>
                    <td>{$vo.mobile}</td>
                    <td>{$vo.address}</td>
                    <td>{$vo.third_party}</td>
                    <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
                    <td>{:date('Y-m-d H:i:s',$vo['last_login_time'])}</td>
                    <td>{$vo.last_login_ip}</td>
                    <td>
                        <if condition="( $vo.user_status1==1)">
                            <span class="label label-danger">未报名</span>
                        <elseif condition="$vo.user_status1==2" />
                            <span class="label label-success">已报名</span>
                        <else /> 全部
                        </if>
                    </td>
                    <td>

                                <a href="{:url('parentIndex/edit',array('id'=>$vo['id']))}"
                                >{:lang('EDIT')}</a> |
                        <a href="{:url('parentIndex/delete',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn"
                           data-msg="删除用户？">{:lang('delete')}</a> |
                        <neq name="vo.id" value="1">
                            <empty name="vo.user_status">
                                <a href="{:url('parentIndex/cancelban',array('id'=>$vo['id']))}"
                                   class="js-ajax-dialog-btn"
                                   data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
                                <else/>
                                <a href="{:url('parentIndex/ban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn"
                                   data-msg="{:lang('BLOCK_USER_CONFIRM_MESSAGE')}">{:lang('BLOCK_USER')}</a>

                            </empty>
                            <else/>
                            <a style="color: #ccc;">{:lang('BLOCK_USER')}</a>
                        </neq>

                    </td>
                    <td>

                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
       `
        <div class="pagination">{$page}</div>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
    $(function() {
        $('[name="start_time"]').datepicker();
        $('[name="end_time"]').datepicker();
    })

    $('[name="start_time"]').datepicker();
    $('[name="end_time"]').datepicker();
</script>
</body>
</html>